﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/OneColumn.Master" AutoEventWireup="true"
    CodeBehind="CheckoutShippingMethod.aspx.cs" Inherits="CS424_9pts.CheckoutShippingMethod" %>

<%@ Register Src="Modules/ShoppingCart.ascx" TagName="ShoppingCart" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="Server">
    <div class="checkout-page">
        <div class="order-progress">
            <ul>
                <li>
                    <asp:HyperLink runat="server" ID="hlCart" Text="Cart" CssClass="active-step" NavigateUrl="~/ShoppingCart.aspx">
                    </asp:HyperLink></li>
                <li>
                    <asp:HyperLink runat="server" ID="hlAddress" Text="Address" CssClass="active-step"
                        NavigateUrl="~/CheckoutShippingAddress.aspx">
                    </asp:HyperLink></li>
                <li>
                    <asp:HyperLink runat="server" ID="hlShipping" Text="Shipping" CssClass="active-step"
                        NavigateUrl="~/CheckoutShippingMethod.aspx">
                    </asp:HyperLink></li>
                <li>
                    <asp:HyperLink runat="server" ID="hlPayment" Text="Payment" CssClass="inactive-step">
                    </asp:HyperLink></li>
                <li>
                    <asp:HyperLink runat="server" ID="hlConfirm" Text="Confirm" CssClass="inactive-step">
                    </asp:HyperLink></li>
                <li>
                    <asp:HyperLink runat="server" ID="hlComplete" Text="Complete" CssClass="inactive-step">
                    </asp:HyperLink></li>
            </ul>
        </div>
        <div class="clear">
        </div>
        <div class="page-title">
            <h1>
                SelectShippingMethod</h1>
        </div>
        <div class="clear">
        </div>
        <div class="checkout-data">
            <div class="shipping-options">
                <asp:Panel runat="server" ID="phSelectShippingMethod">

                    <asp:DataList runat="server" ID="dlShippingOptions" DataSourceID="GetShippingMethods">
                        <ItemTemplate>
                            <div class="shipping-option-item">
                                <div class="option-name">
                                    <asp:RadioButton runat="server" Checked="false" />
                                    <%#Eval("MethodName")%>
                                    ($<%#Eval("Price") %>(USD)
                                </div>
                                <div class="option-description">
                                    <%#Eval("Description") %>
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:DataList>
                    <asp:RadioButtonList ID="rdl" runat="server">
                    </asp:RadioButtonList>

                    <div class="clear">
                    </div>
                    <div class="select-button">
                        <asp:Button runat="server" ID="btnNextStep" Text="Next" OnClick="btnNext_Click" CssClass="shippingmethodnextstepbutton"
                            ValidationGroup="SelectShippingMethod" />
                    </div>
                </asp:Panel>
                <div class="clear">
                </div>
                <div class="error-block">
                    <div class="message-error">
                        <asp:Literal runat="server" ID="lShippingMethodsError" EnableViewState="false"></asp:Literal>
                    </div>
                </div>
            </div>
        </div>
        <div class="clear">
        </div>
        <div class="order-summary-title">
            Order summary
        </div>
        <div class="clear">
        </div>
        <div class="order-summary-body">
            <asp:Panel class="order-summary-content" runat="server" ID="pnlCart">
                <asp:Panel runat="server" ID="pnlCommonWarnings" CssClass="warning-box" EnableViewState="false"
                    Visible="false">
                    <asp:Label runat="server" ID="lblCommonWarning" CssClass="warning-text" EnableViewState="false"
                        Visible="false"></asp:Label>
                </asp:Panel>
                <table class="cart">
                    <uc1:ShoppingCart ID="ShoppingCart1" runat="server" />
                </table>
                <div class="clear">
                </div>
                <div class="selected-checkout-attributes">
                </div>
                <div class="clear">
                </div>
                <div class="clear">
                </div>
                <div class="totals">
                    <div class="total-info">
                        <table class="cart-total">
                            <tbody>
                                <tr>
                                    <td class="cart_total_left">
                                        <strong><span style="white-space: nowrap;">Sub-Total:</span></strong>
                                    </td>
                                    <td class="cart_total_right">
                                        <span style="white-space: nowrap;">
                                            <asp:Label ID="lblSubTotalAmount" runat="server" CssClass="productPrice" />
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="cart_total_right">
                                        <span style="white-space: nowrap;">
                                            <asp:Label ID="lblTotalAmount" runat="server" CssClass="productPrice" />
                                        </span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="clear">
                </div>
                <div class="clear">
                </div>
            </asp:Panel>
        </div>
    </div>
    <asp:SqlDataSource ID="GetShippingMethods" runat="server" ConnectionString="<%$ ConnectionStrings:CarManagementConnectionString %>"
        
        SelectCommand="SELECT ShippingMethod.Price, ShippingMethodDetail.MethodName, ShippingMethodDetail.Description, ShippingMethod.ShippingMethodID FROM ShippingMethod INNER JOIN ShippingMethodDetail ON ShippingMethod.ShippingMethodID = ShippingMethodDetail.ShippingMethodID">
    </asp:SqlDataSource>
</asp:Content>
